Repository navigation
senior-dev: SENIOR_DEV_KEEP_SHELL_PROCESSES=1 leaves the run's processes running - #2950
Open
santoshkumarradha wants to merge 2 commits into
Open
santoshkumarradha wants to merge 2 commits into
santoshkumarradha wants to merge 2 commits into
Conversation
…ses running By default senior-dev stops every process its run started: background jobs of its bash tool, and descendants found by the subreaper and marker sweeps. A request that asks for a service to be left running (a web server, a package index, a git server) therefore ends with the service gone (#2901). With SENIOR_DEV_KEEP_SHELL_PROCESSES=1, CloseShellProcesses and CleanupDescendants leave those processes running. The default is unchanged. Tests: a background bash job and an orphaned descendant both survive the end of a run with the setting on; both fail without the change. Refs #2901 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
senior-dev stops every process its run started when the run ends. That covers its bash tool's background jobs and the descendants found by the subreaper and marker sweeps. When a request asks for a service to be left running, such as a web server, a package index or a git server, the service is gone by the time anyone uses it (#2901).
SENIOR_DEV_KEEP_SHELL_PROCESSES=1leaves those processes running:CloseShellProcessesandCleanupDescendantsreturn without killing. The default behavior is unchanged.Validation
TestBackgroundBashOutlivesTheRunWhenTheRunKeepsShellProcesses: a background bash job survivesCloseShellProcesses.TestCleanupDescendantsLeavesProcessesWhenTheRunKeepsThem: an orphaned descendant survivesCleanupDescendants.go test ./internal/processgroup/ ./internal/seniordev/tool/passes, andgo vetis clean.Limitations
The setting is opt-in and covers the whole run. A later change could keep only the processes the request asks to keep running. Until then, #2901 stays open.
Refs #2901
🤖 Generated with Claude Code